package com.xiaoming;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableAsync;

/**
 * EnableScheduling：开启定时任务
 * EnableAsync：开启异步任务
 *
 * @author xiaoming
 * @Date 2020/4/20
 * @blame Android Team
 */
@SpringBootApplication
//@EnableScheduling
@EnableAsync
public class SpringBootApp {

    public static void main(String[] args) {
        //应用启动的三种方式
        //SpringApplication 静态方法 run
        SpringApplication.run(SpringBootApp.class, args);

        //通过 Api 调整应用行为
     /*  SpringApplication springApplication = new SpringApplication(SpringBootApp.class);
        springApplication.setBannerMode(Banner.Mode.OFF);//关闭打印banner图案
        springApplication.setWebApplicationType(WebApplicationType.NONE);
        springApplication.run(args);

       new SpringApplicationBuilder(SpringBootApp.class)
               .bannerMode(Banner.Mode.OFF)
               .web(WebApplicationType.NONE)
               .run(args);*/

    }
}
